{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e6b4a6a7-d2d9-4ab4-a53f-ee03151420d3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"1JlNCd\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n",
       "       if(!window.letsPlotCallQueue) {\n",
       "           window.letsPlotCallQueue = [];\n",
       "       }; \n",
       "       window.letsPlotCall = function(f) {\n",
       "           window.letsPlotCallQueue.push(f);\n",
       "       };\n",
       "       (function() {\n",
       "           var script = document.createElement(\"script\");\n",
       "           script.type = \"text/javascript\";\n",
       "           script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.5.1/js-package/distr/lets-plot.min.js\";\n",
       "           script.onload = function() {\n",
       "               window.letsPlotCall = function(f) {f();};\n",
       "               window.letsPlotCallQueue.forEach(function(f) {f();});\n",
       "               window.letsPlotCallQueue = [];\n",
       "               \n",
       "               \n",
       "           };\n",
       "           script.onerror = function(event) {\n",
       "               window.letsPlotCall = function(f) {};\n",
       "               window.letsPlotCallQueue = [];\n",
       "               var div = document.createElement(\"div\");\n",
       "               div.style.color = 'darkred';\n",
       "               div.textContent = 'Error loading Lets-Plot JS';\n",
       "               document.getElementById(\"1JlNCd\").appendChild(div);\n",
       "           };\n",
       "           var e = document.getElementById(\"1JlNCd\");\n",
       "           e.appendChild(script);\n",
       "       })();\n",
       "   </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%useLatestDescriptors\n",
    "%use lets-plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "441da677-ca63-49fc-88c1-5c932e2166eb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import kotlin.random.Random"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "eccc91d8-947f-4198-bd43-93908ace27ee",
   "metadata": {},
   "outputs": [],
   "source": [
    "val random = Random(seed = 42)\n",
    "val n = 200\n",
    "val noiseData = mapOf(\n",
    "    \"x\" to List(n) { random.nextDouble(0.0, 200.0) },\n",
    "    \"y\" to List(n) { random.nextDouble(100.0, 400.0) },\n",
    "    \"size\" to List(n) { random.nextDouble(0.1, 2.0) }\n",
    ")\n",
    "val backdrop = geomPoint(data = noiseData, tooltips = tooltipsNone) { x = \"x\"; y = \"y\"; size = \"size\" }"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "86477398-8e04-4bc6-855a-9ffc82b1f406",
   "metadata": {},
   "outputs": [],
   "source": [
    "data class Item(\n",
    "    val name: String,\n",
    "    val documentationUrl: String,\n",
    "    val sourcesUrl: String,\n",
    "    val x: Double,\n",
    "    val y: Double,\n",
    "    val size: Double,\n",
    "    val shape: Int,\n",
    "    val angle: Double\n",
    ")\n",
    "\n",
    "val items = listOf(\n",
    "    Item(\n",
    "        name = \"Lets-Plot\\nMultiplatform\",\n",
    "        documentationUrl = \"https://lets-plot.org\",\n",
    "        sourcesUrl = \"https://github.com/JetBrains/lets-plot\",\n",
    "        x = 0.0, y = 0.0, size = 14.0, shape = 16, angle = 0.0\n",
    "    ),\n",
    "    Item(\n",
    "        name = \"Lets-Plot\\nfor Python\",\n",
    "        documentationUrl = \"https://lets-plot.org/kotlin/get-started.html\",\n",
    "        sourcesUrl = \"https://github.com/JetBrains/lets-plot-kotlin\",\n",
    "        x = 130.0, y = 150.0, size = 9.0, shape = 15, angle = 15.0\n",
    "    ),\n",
    "    Item(\n",
    "        name = \"Lets-Plot\\nfor Kotlin\",\n",
    "        documentationUrl = \"https://lets-plot.org/kotlin/get-started.html\",\n",
    "        sourcesUrl = \"https://github.com/JetBrains/lets-plot-kotlin\",\n",
    "        x = 200.0, y = 200.0, size = 9.0, shape = 15, angle = -15.0\n",
    "    ),\n",
    "    Item(\n",
    "        name = \"Lets-Plot\\nCompose Multiplatform\",\n",
    "        documentationUrl = \"https://github.com/JetBrains/lets-plot-skia\",\n",
    "        sourcesUrl = \"https://github.com/JetBrains/lets-plot-skia\",\n",
    "        x = 80.0, y = 250.0, size = 7.0, shape = 15, angle = 30.0\n",
    "    ),\n",
    "    Item(\n",
    "        name = \"Geocoding\",\n",
    "        documentationUrl = \"https://lets-plot.org/python/pages/geocoding.html\",\n",
    "        sourcesUrl = \"https://github.com/JetBrains/lets-plot\",\n",
    "        x = 70.0, y = 320.0, size = 7.0, shape = 17, angle = 0.0\n",
    "    ),\n",
    "    Item(\n",
    "        name = \"Kandy\",\n",
    "        documentationUrl = \"https://kotlin.github.io/kandy/welcome.html\",\n",
    "        sourcesUrl = \"https://github.com/Kotlin/kandy\",\n",
    "        x = 195.0, y = 150.0, size = 4.0, shape = 16, angle = 0.0\n",
    "    ),\n",
    ")\n",
    "\n",
    "val itemsData = mapOf(\n",
    "    \"name\" to items.map(Item::name),\n",
    "    \"documentationUrl\" to items.map(Item::documentationUrl),\n",
    "    \"sourcesUrl\" to items.map(Item::sourcesUrl),\n",
    "    \"x\" to items.map(Item::x),\n",
    "    \"y\" to items.map(Item::y),\n",
    "    \"size\" to items.map(Item::size),\n",
    "    \"shape\" to items.map(Item::shape),\n",
    "    \"angle\" to items.map(Item::angle),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ed5f1c78-1005-4ffd-8666-9f252c5177c6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"nODbng\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"nODbng\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"ggtitle\":{\n",
       "\"text\":\"The <a href=\\\"https://lets-plot.org/python/pages/gallery.html\\\">Observable</a> LP-verse\",\n",
       "\"subtitle\":\"Latest <a href=\\\"https://github.com/JetBrains/lets-plot/releases/latest\\\">news</a>.\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"coord\":{\n",
       "\"name\":\"polar\"\n",
       "},\n",
       "\"data\":{\n",
       "\"documentationUrl\":[\"https://lets-plot.org\",\"https://lets-plot.org/kotlin/get-started.html\",\"https://lets-plot.org/kotlin/get-started.html\",\"https://github.com/JetBrains/lets-plot-skia\",\"https://lets-plot.org/python/pages/geocoding.html\",\"https://kotlin.github.io/kandy/welcome.html\"],\n",
       "\"size\":[14.0,9.0,9.0,7.0,7.0,4.0],\n",
       "\"shape\":[16.0,15.0,15.0,15.0,17.0,16.0],\n",
       "\"name\":[\"Lets-Plot\\nMultiplatform\",\"Lets-Plot\\nfor Python\",\"Lets-Plot\\nfor Kotlin\",\"Lets-Plot\\nCompose Multiplatform\",\"Geocoding\",\"Kandy\"],\n",
       "\"x\":[0.0,130.0,200.0,80.0,70.0,195.0],\n",
       "\"sourcesUrl\":[\"https://github.com/JetBrains/lets-plot\",\"https://github.com/JetBrains/lets-plot-kotlin\",\"https://github.com/JetBrains/lets-plot-kotlin\",\"https://github.com/JetBrains/lets-plot-skia\",\"https://github.com/JetBrains/lets-plot\",\"https://github.com/Kotlin/kandy\"],\n",
       "\"y\":[0.0,150.0,200.0,250.0,320.0,150.0],\n",
       "\"angle\":[0.0,15.0,-15.0,30.0,0.0,0.0]\n",
       "},\n",
       "\"ggsize\":{\n",
       "\"width\":800.0,\n",
       "\"height\":800.0\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"y\",\n",
       "\"breaks\":[150.0,200.0,250.0,320.0]\n",
       "},{\n",
       "\"aesthetic\":\"shape\",\n",
       "\"discrete\":true,\n",
       "\"scale_mapper_kind\":\"identity\",\n",
       "\"guide\":\"none\"\n",
       "},{\n",
       "\"aesthetic\":\"size\",\n",
       "\"scale_mapper_kind\":\"identity\",\n",
       "\"guide\":\"none\"\n",
       "},{\n",
       "\"aesthetic\":\"y\",\n",
       "\"limits\":[0.0,400.0]\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"x\",\n",
       "\"y\":\"y\",\n",
       "\"size\":\"size\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"data\":{\n",
       "\"size\":[1.6091820472650742,1.7663628931096274,0.7555846717769102,1.9539411540194762,0.4704979521021775,1.5343682893110326,1.0753477892431504,1.2016671914018078,0.19808231586712596,0.130741820735168,0.41437840531951375,1.6762434547273253,1.8716430861150437,1.2503388423173776,0.24130118965698055,1.7750734743016394,1.5256980722369151,0.4217810075063744,1.2658803936726268,1.0020164520128572,1.4928981458065003,0.7839041713847658,0.3099245649880348,1.022768587515559,0.5781479505832593,1.1290212826711452,1.0360238981344239,1.3100638042997106,0.6522595627624608,1.4641471452191068,1.789894057079581,1.943181969155929,1.0514016450137424,1.345014856465134,1.1973115007475372,0.7356204303531918,1.10756032909072,1.0883631140189292,1.4499851422993357,0.18608740450302366,1.9018028982374302,1.4550506158303365,0.8983961248805953,0.7500363931897173,0.3945830130556395,1.3777176433429406,1.8788302515178832,0.24109979376570886,0.6043435913838775,1.2445815449209618,1.2742160975652406,0.48567453880435696,0.21388691749934188,0.3157065010797677,1.4768103815988474,1.9092086789171918,0.3179838353905364,0.5664595273045742,1.1032234518676487,0.961275658728208,0.8394332941786884,1.1892563477782687,0.8137145110931571,0.5858309583930271,0.9122439263711142,1.7705909545341991,0.8245501953160979,0.13275719761619176,1.5612722626893618,0.1817507299716533,0.6693175828372285,0.5277685967128619,0.5148892334542863,1.2761894600060295,1.1576713386561763,1.255371994007387,1.4413635607817272,1.6603838645417015,1.7265444452927659,1.4437852148073385,0.8651157537418526,1.5333847417657556,0.6361161146001578,1.91872085913893,1.3618873210731972,1.0229493882846918,1.6522229903247967,0.6506568300627621,0.8816948580656593,0.1972505870260446,1.7680595751359196,1.3702011887615078,1.4831636376412327,0.45663675766860823,0.9742678857226299,1.7537810154727451,0.587921279158995,1.7113431848243543,1.2492248969681525,1.885262446390401,0.9666724341933263,0.44910290728678115,0.46776059576257956,1.7753889740033837,1.8628196505769632,1.19008760404918,1.3490552589071227,0.5384144795064567,1.6917468525549828,0.4257466632485546,1.0293151764705732,1.884718117467598,0.7906704873448444,1.9748431500237247,1.0979712279668272,0.9470221834993299,0.13821960251904505,0.9371140299465102,0.43225345794350667,1.5136820032247413,1.9604538805729577,0.7802367122487012,0.8802840726847002,1.6916060873761578,0.3993958608271404,0.3097061633359365,0.6938394255700755,0.4140458814862157,1.3691570470349272,0.8653172047812479,0.7665603198663078,1.9913704251961932,1.7469165803307851,1.1415318983792122,1.1481747901005876,1.4138713550894277,1.8386039616748158,0.396694886811358,0.6910002778179318,1.593267574429704,0.5604470823923625,0.806556747449936,0.9700566925494569,0.9386475330302946,0.14086048945956567,0.4028719279646287,0.9925185748393442,1.4914107287161158,1.9956882902943525,1.8942627685303004,1.7971402451499114,0.318677579569451,0.8598187193507261,1.9163538369369826,0.2049844199896405,0.5354733886000802,1.6883279166021772,0.3027978279621639,0.45608810719069703,0.21256485264771774,1.7162510502551012,1.2457838870461702,1.2223884603030686,1.7103917461416058,0.8974980852763671,1.2440723401034481,0.2808572679978144,0.6212764466644148,1.9480100557116122,1.4023149082468738,0.3448598831038069,1.771242483817185,1.3184581302791645,1.9565050711089556,0.37399883495766817,1.510104799046706,0.2600867396763894,0.22040344176011883,1.8180996359540649,1.631353300443469,1.872509757991823,1.0710095087116378,1.561417290939485,0.6985963661063994,0.5586138198769425,0.2496684365408183,0.47007751740662806,0.9453021843253425,0.12201133806371828,1.5614872399794109,1.3162780707994706,1.7054733280977967,1.2017497782288076,1.6321554524702988,1.202960159457846,0.19712316669570293,0.10543306104467087,1.6373309423301707,1.2963183138811059,1.1493371993861405],\n",
       "\"x\":[45.26305319446355,180.99136344713745,54.14563462535009,194.09801357287733,36.72076780779041,118.52419576812632,58.87069621374916,27.629703112790228,118.61556504196152,17.09625182011385,127.07946443829181,160.83678390138834,73.15432275555112,63.514201937585234,72.82731311356426,88.73811201857116,191.0098106164946,89.6730897061021,44.22600574159119,50.331090143853864,102.18613379666233,114.1525719804597,136.1160754476037,119.01954786280768,138.36047586283084,186.52915055875206,41.46164236267087,173.9433390012861,77.81020756618706,38.575428673529366,190.93872726128654,42.969602745152,129.99040129621162,108.12615072734191,160.9250662153226,118.43650107916383,166.16584290093033,130.81490459177328,80.67740216246658,110.8940264664613,198.49114369687942,199.20575845525198,180.0398010721406,91.9041934914431,32.74285540052158,175.07100896407763,156.1064957563006,141.20733622164232,126.96336642351677,28.060589784372848,65.29295329325586,148.53603967807544,38.518390798171296,58.228601836212476,99.2054481910996,156.10652716069532,97.57367458579157,149.08186810242447,7.8808451191072715,181.34027456954257,132.51866093549464,152.32523749045268,82.68986252308794,49.605099130761744,132.34798451333646,164.3403722758936,13.382754777291982,151.86291148486563,91.19496767895525,153.5551621162029,128.69415605052433,116.02633750655454,47.46721432958616,40.493670241240444,121.30536040013816,153.21939338472487,100.07145438296942,10.38040582205506,77.45717198449749,79.41123683629235,20.923270540046325,142.40132331058152,59.566468084647205,199.0083688220658,198.45805039644975,56.409049775574125,116.25766832424237,41.2252639365156,75.48301851362345,173.7259571621214,28.71815343527182,194.5579916104326,23.948370412582687,149.02218136770645,189.61743457916148,97.83792415112529,55.68156882567137,15.232486872566199,18.771752108623787,177.26067345958865,75.84136980065341,118.39862979259898,141.6671619647608,145.9583436547377,179.39888442222357,154.72419394570994,130.591328645144,150.1989157820485,6.984635380894222,10.687773784677201,188.8310115283768,135.32042172432995,18.253801687742932,109.87027723957392,59.907263919067624,91.6755540244854,66.28438932113312,94.67525125335486,52.367386518751616,192.8043582526143,59.603534092173895,172.69094562331844,78.12777007608756,165.00012938075724,146.76736073205657,38.33491381480651,30.092791710641297,166.47994615320516,104.80266115193453,16.027798816246165,17.949540456731896,176.84452985242314,125.52360031449818,115.93228708283733,62.14001500439777,190.5622925156939,17.843664075957278,119.32064004844693,34.448052977524824,182.5974915337625,160.71634549079639,48.07653503174822,110.34774722153018,115.73210675686047,177.84543029225532,3.830489215598454,36.31668835084354,76.23924475419874,125.24107816673657,168.3811394206878,74.96428828214808,55.453895998754746,30.225605330153506,104.213494088539,71.2603340223768,131.26725199628072,3.2241808783069814,133.9127998879999,160.12988919748105,45.03720329291041,181.59329900092763,28.336637965937772,105.43219157068154,76.67982259499466,170.4824758906835,155.32258323911117,65.87693065801403,138.82059924238163,173.12623107095652,73.52997826911431,30.79515359442613,12.52221387848882,20.574239529769134,170.54206679851796,138.388008218595,54.06438961682889,177.56236495105819,69.07317928110959,56.20919148618504,168.88951923723005,12.399558061838434,156.3134144924314,8.406737921715646,148.73810225218443,191.13604843489,153.29907173796198,114.87173861540332,128.17610978363635,164.95883378628758,186.91893076370593,57.369249598456726,141.88047790985053,162.7299905897634,7.698954787118284,32.49071245226287,32.65165661644007,18.53528024978037,49.35504890988904,148.90002598129365,97.83628306604932],\n",
       "\"y\":[239.3479738433737,347.4200261492333,239.82980189759218,189.91184135279894,237.03934430085292,281.79206010665973,223.03209237505797,323.6729868052715,314.7378449211967,236.40148372014724,378.2216532852659,331.6653817358639,283.4300156728393,143.28672310519124,370.9183804641427,117.97601042299533,359.7212305343198,349.47222666614937,309.05138848994756,304.32582194824715,348.4271057018091,185.27794120397044,245.58996771472243,289.23610312006986,237.8240697185492,337.3816385298505,348.99859509304315,311.6415959659016,311.0036576013381,329.022221828019,337.2407160622287,174.6004931712149,373.4837967720992,272.30382300926556,101.4149082249772,153.66149826704492,397.3302435288579,109.97237870124404,357.4878702675728,200.24088149968208,235.55192018630513,276.99319665197504,191.95952247864392,179.28283851738485,395.396288081978,124.25307861481028,321.5887263776375,302.6208135949044,287.750404308562,115.38879708700426,225.96453958939043,195.44171902406387,327.2765618280432,105.4373273943302,327.8159329802753,344.0327797185788,140.46999174246906,342.23716707744313,142.93070314089164,194.9941342953681,118.05955513790379,205.3532604827172,204.7688166195989,300.7024168466843,304.330161515241,158.06956007019195,181.33866883878227,212.53840088144486,356.48539811006503,314.0024156347703,193.39223113802694,128.18377692949326,240.8944959574594,261.84791051500804,260.09316778592733,107.45267353923109,275.47475701067333,260.3204991066161,343.40850628069916,124.46857209740696,341.74778867880264,203.6259963536171,158.23710341371083,126.6382671568723,128.45302469449086,171.16660392792375,221.9964770571774,325.2748952673678,247.78182067057784,364.05790446680436,237.02207712609857,111.64062832978878,214.53275218004478,360.0223386881032,183.5917522458936,157.66333258757862,355.538202411409,222.6979712878403,308.2957774928939,123.526632518172,304.6016274559556,120.75218088995908,238.98893968294385,119.64386042694225,213.21511694774523,118.70548927799793,247.5156145103637,187.38951496991874,369.02773324830576,274.357711292849,348.82691553045254,195.84441890913527,242.01821484424752,214.06900540152145,208.01376902641093,362.9925836877597,168.73568072354885,245.34753238437514,206.60874981972756,256.2971231736684,329.6326494471666,269.550117378731,244.40983187693735,324.3967818468053,149.80645456355512,122.44126799233203,301.7913080944452,175.2447127206966,131.9692829811924,128.25207345696637,185.73956833679367,200.52441635650774,317.1029216243418,207.84145680373757,228.53249794133367,375.74873393555,114.07000101023148,351.29392587941885,143.43305110725368,231.7472303812403,253.66097173857304,205.04531592359658,293.2258389885875,159.33695424707577,331.4340573565221,392.5858426587122,212.17137635341874,260.2193531261434,132.62390230846825,392.5797755171869,193.7462622885696,172.9755829744097,305.1157886957048,288.62743555762825,387.62080726710974,220.57769584982978,158.38102135950717,325.3238887082291,160.6883206978241,357.08427553415964,159.5165744033968,378.9384815853331,167.56326224741116,288.8600979155093,228.4655722360361,135.41773441358836,295.16722046138045,276.81326065094663,165.723569715577,156.09781225032876,309.0987957335901,125.91408847138365,142.9498454752436,138.10758741722032,292.6484850012232,203.18852044251742,159.30520158919654,213.31111528472667,279.6119925167791,332.0748500302932,345.19346523618714,269.02450736988874,123.00564978248775,282.6178019341304,322.53703101257986,397.14708516871326,105.49197233408871,102.02036709314503,331.82454077333944,328.42669122015485,183.10057942251086,149.65119499749073,399.73977884666556,225.53246921742493,330.15650168396496,161.25337036642367,222.46453947074767,201.71427679872312,367.07402060247017,361.90631120723367]\n",
       "},\n",
       "\"position\":\"identity\",\n",
       "\"geom\":\"point\",\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"x\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"y\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"size\"\n",
       "}]\n",
       "},\n",
       "\"tooltips\":\"none\"\n",
       "},{\n",
       "\"mapping\":{\n",
       "\"x\":\"x\",\n",
       "\"y\":\"y\",\n",
       "\"color\":\"name\",\n",
       "\"shape\":\"shape\",\n",
       "\"size\":\"size\",\n",
       "\"angle\":\"angle\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"show_legend\":false,\n",
       "\"position\":\"identity\",\n",
       "\"geom\":\"point\",\n",
       "\"tooltips\":{\n",
       "\"title\":\"@name\",\n",
       "\"lines\":[\"Links: <a href=\\\"@{documentationUrl}\\\">docs</a>, <a href=\\\"@{sourcesUrl}\\\">sources</a>\"]\n",
       "},\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"shape\":1.0,\n",
       "\"size\":37.0,\n",
       "\"x\":200.0,\n",
       "\"y\":200.0,\n",
       "\"position\":\"identity\",\n",
       "\"geom\":\"point\",\n",
       "\"stroke\":0.07,\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"rgb(255,255,97)\",\n",
       "\"size\":1.0,\n",
       "\"x\":195.0,\n",
       "\"y\":150.0,\n",
       "\"angle\":-1.4952380952380953,\n",
       "\"position\":\"identity\",\n",
       "\"geom\":\"spoke\",\n",
       "\"radius\":30.0,\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"size\":12.0,\n",
       "\"x\":50.0,\n",
       "\"y\":250.0,\n",
       "\"position\":\"identity\",\n",
       "\"label\":\"Hover, then click\\nto <a href=\\\"https://www.merriam-webster.com/dictionary/freeze\\\">freeze</a> the tooltip.\\nClick links\\nto navigate.\",\n",
       "\"geom\":\"text\",\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"arrow\":{\n",
       "\"name\":\"arrow\",\n",
       "\"angle\":40.0,\n",
       "\"type\":\"open\"\n",
       "},\n",
       "\"x\":70.0,\n",
       "\"y\":250.0,\n",
       "\"yend\":0.0,\n",
       "\"position\":\"identity\",\n",
       "\"xend\":0.0,\n",
       "\"geom\":\"segment\",\n",
       "\"size_end\":20.0,\n",
       "\"size_start\":150.0,\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"caption\":{\n",
       "\"text\":\"User <a href=\\\"https://github.com/JetBrains/lets-plot/issues\\\">stories</a>.\"\n",
       "},\n",
       "\"theme\":{\n",
       "\"panel_grid_major_y\":{\n",
       "\"size\":3.0,\n",
       "\"linetype\":\"dotted\",\n",
       "\"blank\":false\n",
       "},\n",
       "\"plot_margin\":[40.0,0.0,0.0],\n",
       "\"axis_ticks\":\"blank\",\n",
       "\"axis_title\":\"blank\",\n",
       "\"axis_text\":\"blank\",\n",
       "\"plot_title\":{\n",
       "\"face\":\"bold\",\n",
       "\"size\":25.0,\n",
       "\"hjust\":0.5,\n",
       "\"blank\":false\n",
       "},\n",
       "\"panel_grid\":\"blank\",\n",
       "\"plot_subtitle\":{\n",
       "\"hjust\":0.5,\n",
       "\"blank\":false\n",
       "},\n",
       "\"flavor\":\"high_contrast_dark\"\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"name\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"documentationUrl\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"sourcesUrl\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"x\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"y\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"size\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"shape\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"angle\"\n",
       "}]\n",
       "},\n",
       "\"spec_id\":\"1\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "letsPlot(itemsData) + backdrop +\n",
    "    geomPoint(showLegend = false,\n",
    "              tooltips = layerTooltips()\n",
    "                         .title(\"@name\")\n",
    "                         .line(\"Links: <a href=\\\"@{documentationUrl}\\\">docs</a>, <a href=\\\"@{sourcesUrl}\\\">sources</a>\")\n",
    "             ) { x = \"x\"; y = \"y\"; size = \"size\"; shape = \"shape\"; angle = \"angle\"; color = \"name\" } +\n",
    "    // Kandy orbit\n",
    "    geomPoint(x = 200, y = 200, size = 37, shape = 1, stroke = 0.07) +\n",
    "    // Kandy stick\n",
    "    geomSpoke(x = 195, y = 150, angle=-3.14/2/1.05, radius=30, size = 1, color = \"rgb(255,255,97)\") +\n",
    "    // Guide\n",
    "    geomText(x = 50, y = 250, size = 12,\n",
    "             label = \"Hover, then click\\nto <a href=\\\"https://www.merriam-webster.com/dictionary/freeze\\\">freeze</a> the tooltip.\\nClick links\\nto navigate.\") +\n",
    "    geomSegment(x = 70, y = 250, xend = 0, yend = 0,\n",
    "                sizeStart = 150, sizeEnd = 20,\n",
    "                arrow = arrow(type = \"open\", angle = 40)) +\n",
    "    scaleYContinuous(breaks = listOf(150, 200, 250, 320)) +\n",
    "    scaleShapeIdentity() + scaleSizeIdentity() +\n",
    "    coordPolar() +\n",
    "    ylim(listOf(0, 400)) +\n",
    "    labs(title = \"The <a href=\\\"https://lets-plot.org/python/pages/gallery.html\\\">Observable</a> LP-verse\",\n",
    "         subtitle = \"Latest <a href=\\\"https://github.com/JetBrains/lets-plot/releases/latest\\\">news</a>.\",\n",
    "         caption = \"User <a href=\\\"https://github.com/JetBrains/lets-plot/issues\\\">stories</a>.\") +\n",
    "    ggsize(800, 800) +\n",
    "    theme(\n",
    "        plotTitle = elementText(size = 25, face = \"bold\", hjust = 0.5),\n",
    "        plotSubtitle = elementText(hjust = 0.5),\n",
    "        plotMargin = listOf(40, 0, 0),\n",
    "        axisTitle = \"blank\",\n",
    "        axisText = \"blank\",\n",
    "        axisTicks = \"blank\",\n",
    "        panelGrid = \"blank\",\n",
    "        panelGridMajorY = elementLine(size = 3, linetype = \"dotted\")\n",
    "     ) +\n",
    "    flavorHighContrastDark()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Kotlin",
   "language": "kotlin",
   "name": "kotlin"
  },
  "language_info": {
   "codemirror_mode": "text/x-kotlin",
   "file_extension": ".kt",
   "mimetype": "text/x-kotlin",
   "name": "kotlin",
   "nbconvert_exporter": "",
   "pygments_lexer": "kotlin",
   "version": "1.9.23"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
